
<!DOCTYPE HTML>
<html lang="en" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>loader · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-title/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../styles/website.css">
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="LoadingItems.html" />
    
    
    <link rel="prev" href="Layout.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
    <nav role="navigation" class="autoshow">
        <ul class="summary">
        <li><a href="http://cocos.com" class="btn" target="_blank"><img src="http://forum.cocos.com/images/logo.png" height="30" /></a></li>
        <li><a href="#" class="btn" onclick="toggleLanguage()">中文</a></li>
        
        
        <li class="version-link">
            <a href="#" class="btn" style="color:#444"></i>Version: <span style="font-weight: bold; display: inline">2.0 Preview</span></a>
            <ul class="hovershow">
                
                <li><a href="http://docs.cocos.com/creator/api/en" class="btn">Version: <span style="font-weight:bold; display: inline">1.x</span></a></li>
                
                <li><a href="http://docs.cocos.com/creator/api/2.0/en" class="btn">Version: <span style="font-weight:bold; display: inline">2.0 Preview</span></a></li>
                
            </ul>
        </li>                
        
          
        
        
        <li>
            <a class="btn"><i class="fa fa-book"></i>Cocos Creator</a>
            <ul>
                
                <li><a href="http://docs.cocos.com/creator/manual/en" class="btn">Manual</a></li>
                
                <li><a href="http://docs.cocos.com/creator/api/en" class="btn">API Ref</a></li>
                
            </ul>
        </li>                
        
        
        
        <li>
            <a class="btn"><i class="fa fa-book"></i>Cocos2d-x</a>
            <ul>
                
                <li><a href="http://docs.cocos.com/cocos2d-x/manual/en/" class="btn">Manual</a></li>
                
                <li><a href="http://www.cocos2d-x.org/docs/api-ref/index.html" class="btn">API Ref</a></li>
                
            </ul>
        </li>                
        
        
        
        <li><a href="http://docs.anysdk.com/" class="btn"><i class="fa fa-book"></i>AnySDK</a></li>
        
        
        </ul>
    </nav>
    
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        <li class="header">Modules</li>
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../modules/GLOBAL-MACROS.html">
            
                <a href="../modules/GLOBAL-MACROS.html">
            
                    
                    GLOBAL-MACROS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../modules/_decorator.html">
            
                <a href="../modules/_decorator.html">
            
                    
                    _decorator
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../modules/anysdk.html">
            
                <a href="../modules/anysdk.html">
            
                    
                    anysdk
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../modules/cc.html">
            
                <a href="../modules/cc.html">
            
                    
                    cc
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../modules/dragonBones.html">
            
                <a href="../modules/dragonBones.html">
            
                    
                    dragonBones
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../modules/js.html">
            
                <a href="../modules/js.html">
            
                    
                    js
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../modules/sp.html">
            
                <a href="../modules/sp.html">
            
                    
                    sp
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../modules/sp.spine.html">
            
                <a href="../modules/sp.spine.html">
            
                    
                    sp.spine
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Classes</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="Action.html">
            
                <a href="Action.html">
            
                    
                    Action
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="ActionInstant.html">
            
                <a href="ActionInstant.html">
            
                    
                    ActionInstant
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="ActionInterval.html">
            
                <a href="ActionInterval.html">
            
                    
                    ActionInterval
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="ActionManager.html">
            
                <a href="ActionManager.html">
            
                    
                    ActionManager
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="AffineTransform.html">
            
                <a href="AffineTransform.html">
            
                    
                    AffineTransform
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="AgentManager.html">
            
                <a href="AgentManager.html">
            
                    
                    AgentManager
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="Animation.html">
            
                <a href="Animation.html">
            
                    
                    Animation
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="AnimationClip.html">
            
                <a href="AnimationClip.html">
            
                    
                    AnimationClip
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9" data-path="AnimationState.html">
            
                <a href="AnimationState.html">
            
                    
                    AnimationState
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="ArmatureDisplay.html">
            
                <a href="ArmatureDisplay.html">
            
                    
                    ArmatureDisplay
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.11" data-path="array.html">
            
                <a href="array.html">
            
                    
                    array
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.12" data-path="Asset.html">
            
                <a href="Asset.html">
            
                    
                    Asset
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.13" data-path="AudioClip.html">
            
                <a href="AudioClip.html">
            
                    
                    AudioClip
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.14" data-path="audioEngine.html">
            
                <a href="audioEngine.html">
            
                    
                    audioEngine
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.15" data-path="AudioSource.html">
            
                <a href="AudioSource.html">
            
                    
                    AudioSource
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.16" data-path="BitmapFont.html">
            
                <a href="BitmapFont.html">
            
                    
                    BitmapFont
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.17" data-path="BlockInputEvents.html">
            
                <a href="BlockInputEvents.html">
            
                    
                    BlockInputEvents
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.18" data-path="BoxCollider.html">
            
                <a href="BoxCollider.html">
            
                    
                    BoxCollider
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.19" data-path="Button.html">
            
                <a href="Button.html">
            
                    
                    Button
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.20" data-path="CallbacksInvoker.html">
            
                <a href="CallbacksInvoker.html">
            
                    
                    CallbacksInvoker
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.21" data-path="Camera.html">
            
                <a href="Camera.html">
            
                    
                    Camera
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.22" data-path="Canvas.html">
            
                <a href="Canvas.html">
            
                    
                    Canvas
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.23" data-path="CircleCollider.html">
            
                <a href="CircleCollider.html">
            
                    
                    CircleCollider
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.24" data-path="CoffeeScript.html">
            
                <a href="CoffeeScript.html">
            
                    
                    CoffeeScript
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.25" data-path="Collider.html">
            
                <a href="Collider.html">
            
                    
                    Collider
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.26" data-path="Collider.Box.html">
            
                <a href="Collider.Box.html">
            
                    
                    Collider.Box
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.27" data-path="Collider.Circle.html">
            
                <a href="Collider.Circle.html">
            
                    
                    Collider.Circle
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.28" data-path="Collider.Polygon.html">
            
                <a href="Collider.Polygon.html">
            
                    
                    Collider.Polygon
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.29" data-path="CollisionManager.html">
            
                <a href="CollisionManager.html">
            
                    
                    CollisionManager
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.30" data-path="Color.html">
            
                <a href="Color.html">
            
                    
                    Color
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.31" data-path="Component.html">
            
                <a href="Component.html">
            
                    
                    Component
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.32" data-path="Component.EventHandler.html">
            
                <a href="Component.EventHandler.html">
            
                    
                    Component.EventHandler
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.33" data-path="constructor.html">
            
                <a href="constructor.html">
            
                    
                    constructor
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.34" data-path="ContainerStrategy.html">
            
                <a href="ContainerStrategy.html">
            
                    
                    ContainerStrategy
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.35" data-path="ContentStrategy.html">
            
                <a href="ContentStrategy.html">
            
                    
                    ContentStrategy
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.36" data-path="Details.html">
            
                <a href="Details.html">
            
                    
                    Details
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.37" data-path="Director.html">
            
                <a href="Director.html">
            
                    
                    Director
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.38" data-path="DistanceJoint.html">
            
                <a href="DistanceJoint.html">
            
                    
                    DistanceJoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.39" data-path="DragonBonesAsset.html">
            
                <a href="DragonBonesAsset.html">
            
                    
                    DragonBonesAsset
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.40" data-path="DragonBonesAtlasAsset.html">
            
                <a href="DragonBonesAtlasAsset.html">
            
                    
                    DragonBonesAtlasAsset
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.41" data-path="EditBox.html">
            
                <a href="EditBox.html">
            
                    
                    EditBox
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.42" data-path="EqualToFrame.html">
            
                <a href="EqualToFrame.html">
            
                    
                    EqualToFrame
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.43" data-path="EqualToWindow.html">
            
                <a href="EqualToWindow.html">
            
                    
                    EqualToWindow
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.44" data-path="Event.html">
            
                <a href="Event.html">
            
                    
                    Event
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.45" data-path="Event.EventAcceleration.html">
            
                <a href="Event.EventAcceleration.html">
            
                    
                    Event.EventAcceleration
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.46" data-path="Event.EventCustom.html">
            
                <a href="Event.EventCustom.html">
            
                    
                    Event.EventCustom
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.47" data-path="Event.EventKeyboard.html">
            
                <a href="Event.EventKeyboard.html">
            
                    
                    Event.EventKeyboard
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.48" data-path="Event.EventMouse.html">
            
                <a href="Event.EventMouse.html">
            
                    
                    Event.EventMouse
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.49" data-path="Event.EventTouch.html">
            
                <a href="Event.EventTouch.html">
            
                    
                    Event.EventTouch
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.50" data-path="EventTarget.html">
            
                <a href="EventTarget.html">
            
                    
                    EventTarget
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.51" data-path="FiniteTimeAction.html">
            
                <a href="FiniteTimeAction.html">
            
                    
                    FiniteTimeAction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.52" data-path="Font.html">
            
                <a href="Font.html">
            
                    
                    Font
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.53" data-path="Game.html">
            
                <a href="Game.html">
            
                    
                    Game
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.54" data-path="Graphics.html">
            
                <a href="Graphics.html">
            
                    
                    Graphics
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.55" data-path="Intersection.html">
            
                <a href="Intersection.html">
            
                    
                    Intersection
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.56" data-path="Joint.html">
            
                <a href="Joint.html">
            
                    
                    Joint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.57" data-path="JsonAsset.html">
            
                <a href="JsonAsset.html">
            
                    
                    JsonAsset
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.58" data-path="Label.html">
            
                <a href="Label.html">
            
                    
                    Label
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.59" data-path="LabelAtlas.html">
            
                <a href="LabelAtlas.html">
            
                    
                    LabelAtlas
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.60" data-path="LabelOutline.html">
            
                <a href="LabelOutline.html">
            
                    
                    LabelOutline
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.61" data-path="Layout.html">
            
                <a href="Layout.html">
            
                    
                    Layout
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="2.62" data-path="loader.html">
            
                <a href="loader.html">
            
                    
                    loader
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.63" data-path="LoadingItems.html">
            
                <a href="LoadingItems.html">
            
                    
                    LoadingItems
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.64" data-path="Manifold.html">
            
                <a href="Manifold.html">
            
                    
                    Manifold
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.65" data-path="ManifoldPoint.html">
            
                <a href="ManifoldPoint.html">
            
                    
                    ManifoldPoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.66" data-path="Mask.html">
            
                <a href="Mask.html">
            
                    
                    Mask
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.67" data-path="misc.html">
            
                <a href="misc.html">
            
                    
                    misc
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.68" data-path="MotionStreak.html">
            
                <a href="MotionStreak.html">
            
                    
                    MotionStreak
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.69" data-path="MotorJoint.html">
            
                <a href="MotorJoint.html">
            
                    
                    MotorJoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.70" data-path="MouseJoint.html">
            
                <a href="MouseJoint.html">
            
                    
                    MouseJoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.71" data-path="Node.html">
            
                <a href="Node.html">
            
                    
                    Node
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.72" data-path="NodePool.html">
            
                <a href="NodePool.html">
            
                    
                    NodePool
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.73" data-path="OriginalContainer.html">
            
                <a href="OriginalContainer.html">
            
                    
                    OriginalContainer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.74" data-path="PageView.html">
            
                <a href="PageView.html">
            
                    
                    PageView
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.75" data-path="PageViewIndicator.html">
            
                <a href="PageViewIndicator.html">
            
                    
                    PageViewIndicator
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.76" data-path="ParticleAsset.html">
            
                <a href="ParticleAsset.html">
            
                    
                    ParticleAsset
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.77" data-path="ParticleSystem.html">
            
                <a href="ParticleSystem.html">
            
                    
                    ParticleSystem
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.78" data-path="path.html">
            
                <a href="path.html">
            
                    
                    path
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.79" data-path="PhysicsBoxCollider.html">
            
                <a href="PhysicsBoxCollider.html">
            
                    
                    PhysicsBoxCollider
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.80" data-path="PhysicsChainCollider.html">
            
                <a href="PhysicsChainCollider.html">
            
                    
                    PhysicsChainCollider
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.81" data-path="PhysicsCircleCollider.html">
            
                <a href="PhysicsCircleCollider.html">
            
                    
                    PhysicsCircleCollider
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.82" data-path="PhysicsCollider.html">
            
                <a href="PhysicsCollider.html">
            
                    
                    PhysicsCollider
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.83" data-path="PhysicsContact.html">
            
                <a href="PhysicsContact.html">
            
                    
                    PhysicsContact
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.84" data-path="PhysicsImpulse.html">
            
                <a href="PhysicsImpulse.html">
            
                    
                    PhysicsImpulse
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.85" data-path="PhysicsManager.html">
            
                <a href="PhysicsManager.html">
            
                    
                    PhysicsManager
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.86" data-path="PhysicsPolygonCollider.html">
            
                <a href="PhysicsPolygonCollider.html">
            
                    
                    PhysicsPolygonCollider
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.87" data-path="PhysicsRayCastResult.html">
            
                <a href="PhysicsRayCastResult.html">
            
                    
                    PhysicsRayCastResult
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.88" data-path="Pipeline.html">
            
                <a href="Pipeline.html">
            
                    
                    Pipeline
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.89" data-path="Pipeline.Downloader.html">
            
                <a href="Pipeline.Downloader.html">
            
                    
                    Pipeline.Downloader
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.90" data-path="Pipeline.Loader.html">
            
                <a href="Pipeline.Loader.html">
            
                    
                    Pipeline.Loader
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.91" data-path="Playable.html">
            
                <a href="Playable.html">
            
                    
                    Playable
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.92" data-path="PluginParam.html">
            
                <a href="PluginParam.html">
            
                    
                    PluginParam
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.93" data-path="PluginProtocol.html">
            
                <a href="PluginProtocol.html">
            
                    
                    PluginProtocol
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.94" data-path="PolygonCollider.html">
            
                <a href="PolygonCollider.html">
            
                    
                    PolygonCollider
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.95" data-path="Pool.html">
            
                <a href="Pool.html">
            
                    
                    Pool
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.96" data-path="Prefab.html">
            
                <a href="Prefab.html">
            
                    
                    Prefab
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.97" data-path="PrismaticJoint.html">
            
                <a href="PrismaticJoint.html">
            
                    
                    PrismaticJoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.98" data-path="PrivateNode.html">
            
                <a href="PrivateNode.html">
            
                    
                    PrivateNode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.99" data-path="ProgressBar.html">
            
                <a href="ProgressBar.html">
            
                    
                    ProgressBar
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.100" data-path="ProportionalToFrame.html">
            
                <a href="ProportionalToFrame.html">
            
                    
                    ProportionalToFrame
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.101" data-path="ProportionalToWindow.html">
            
                <a href="ProportionalToWindow.html">
            
                    
                    ProportionalToWindow
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.102" data-path="ProtocolAds.html">
            
                <a href="ProtocolAds.html">
            
                    
                    ProtocolAds
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.103" data-path="ProtocolAdTracking.html">
            
                <a href="ProtocolAdTracking.html">
            
                    
                    ProtocolAdTracking
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.104" data-path="ProtocolAnalytics.html">
            
                <a href="ProtocolAnalytics.html">
            
                    
                    ProtocolAnalytics
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.105" data-path="ProtocolCrash.html">
            
                <a href="ProtocolCrash.html">
            
                    
                    ProtocolCrash
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.106" data-path="ProtocolCustom.html">
            
                <a href="ProtocolCustom.html">
            
                    
                    ProtocolCustom
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.107" data-path="ProtocolIAP.html">
            
                <a href="ProtocolIAP.html">
            
                    
                    ProtocolIAP
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.108" data-path="ProtocolPush.html">
            
                <a href="ProtocolPush.html">
            
                    
                    ProtocolPush
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.109" data-path="ProtocolREC.html">
            
                <a href="ProtocolREC.html">
            
                    
                    ProtocolREC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.110" data-path="ProtocolShare.html">
            
                <a href="ProtocolShare.html">
            
                    
                    ProtocolShare
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.111" data-path="ProtocolSocial.html">
            
                <a href="ProtocolSocial.html">
            
                    
                    ProtocolSocial
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.112" data-path="ProtocolUser.html">
            
                <a href="ProtocolUser.html">
            
                    
                    ProtocolUser
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.113" data-path="Quat.html">
            
                <a href="Quat.html">
            
                    
                    Quat
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.114" data-path="RawAsset.html">
            
                <a href="RawAsset.html">
            
                    
                    RawAsset
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.115" data-path="Rect.html">
            
                <a href="Rect.html">
            
                    
                    Rect
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.116" data-path="RenderComponent.html">
            
                <a href="RenderComponent.html">
            
                    
                    RenderComponent
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.117" data-path="RenderTexture.html">
            
                <a href="RenderTexture.html">
            
                    
                    RenderTexture
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.118" data-path="ResolutionPolicy.html">
            
                <a href="ResolutionPolicy.html">
            
                    
                    ResolutionPolicy
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.119" data-path="RevoluteJoint.html">
            
                <a href="RevoluteJoint.html">
            
                    
                    RevoluteJoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.120" data-path="RichText.html">
            
                <a href="RichText.html">
            
                    
                    RichText
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.121" data-path="RigidBody.html">
            
                <a href="RigidBody.html">
            
                    
                    RigidBody
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.122" data-path="RopeJoint.html">
            
                <a href="RopeJoint.html">
            
                    
                    RopeJoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.123" data-path="Scene.html">
            
                <a href="Scene.html">
            
                    
                    Scene
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.124" data-path="SceneAsset.html">
            
                <a href="SceneAsset.html">
            
                    
                    SceneAsset
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.125" data-path="Scheduler.html">
            
                <a href="Scheduler.html">
            
                    
                    Scheduler
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.126" data-path="screen.html">
            
                <a href="screen.html">
            
                    
                    screen
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.127" data-path="Scrollbar.html">
            
                <a href="Scrollbar.html">
            
                    
                    Scrollbar
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.128" data-path="ScrollView.html">
            
                <a href="ScrollView.html">
            
                    
                    ScrollView
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.129" data-path="Size.html">
            
                <a href="Size.html">
            
                    
                    Size
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.130" data-path="Skeleton.html">
            
                <a href="Skeleton.html">
            
                    
                    Skeleton
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.131" data-path="SkeletonData.html">
            
                <a href="SkeletonData.html">
            
                    
                    SkeletonData
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.132" data-path="Slider.html">
            
                <a href="Slider.html">
            
                    
                    Slider
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.133" data-path="Sprite.html">
            
                <a href="Sprite.html">
            
                    
                    Sprite
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.134" data-path="SpriteAtlas.html">
            
                <a href="SpriteAtlas.html">
            
                    
                    SpriteAtlas
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.135" data-path="SpriteFrame.html">
            
                <a href="SpriteFrame.html">
            
                    
                    SpriteFrame
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.136" data-path="sys.html">
            
                <a href="sys.html">
            
                    
                    sys
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.137" data-path="SystemEvent.html">
            
                <a href="SystemEvent.html">
            
                    
                    SystemEvent
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.138" data-path="SystemEvent.EventType.html">
            
                <a href="SystemEvent.EventType.html">
            
                    
                    SystemEvent.EventType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.139" data-path="TextAsset.html">
            
                <a href="TextAsset.html">
            
                    
                    TextAsset
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.140" data-path="Texture2D.html">
            
                <a href="Texture2D.html">
            
                    
                    Texture2D
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.141" data-path="TiledLayer.html">
            
                <a href="TiledLayer.html">
            
                    
                    TiledLayer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.142" data-path="TiledMap.html">
            
                <a href="TiledMap.html">
            
                    
                    TiledMap
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.143" data-path="TiledMapAsset.html">
            
                <a href="TiledMapAsset.html">
            
                    
                    TiledMapAsset
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.144" data-path="TiledObjectGroup.html">
            
                <a href="TiledObjectGroup.html">
            
                    
                    TiledObjectGroup
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.145" data-path="TiledTile.html">
            
                <a href="TiledTile.html">
            
                    
                    TiledTile
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.146" data-path="Toggle.html">
            
                <a href="Toggle.html">
            
                    
                    Toggle
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.147" data-path="ToggleContainer.html">
            
                <a href="ToggleContainer.html">
            
                    
                    ToggleContainer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.148" data-path="ToggleGroup.html">
            
                <a href="ToggleGroup.html">
            
                    
                    ToggleGroup
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.149" data-path="Touch.html">
            
                <a href="Touch.html">
            
                    
                    Touch
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.150" data-path="TTFFont.html">
            
                <a href="TTFFont.html">
            
                    
                    TTFFont
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.151" data-path="TypeScript.html">
            
                <a href="TypeScript.html">
            
                    
                    TypeScript
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.152" data-path="url.html">
            
                <a href="url.html">
            
                    
                    url
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.153" data-path="ValueType.html">
            
                <a href="ValueType.html">
            
                    
                    ValueType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.154" data-path="Vec2.html">
            
                <a href="Vec2.html">
            
                    
                    Vec2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.155" data-path="Vec3.html">
            
                <a href="Vec3.html">
            
                    
                    Vec3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.156" data-path="VideoPlayer.html">
            
                <a href="VideoPlayer.html">
            
                    
                    VideoPlayer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.157" data-path="View.html">
            
                <a href="View.html">
            
                    
                    View
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.158" data-path="ViewGroup.html">
            
                <a href="ViewGroup.html">
            
                    
                    ViewGroup
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.159" data-path="visibleRect.html">
            
                <a href="visibleRect.html">
            
                    
                    visibleRect
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.160" data-path="WebView.html">
            
                <a href="WebView.html">
            
                    
                    WebView
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.161" data-path="WeldJoint.html">
            
                <a href="WeldJoint.html">
            
                    
                    WeldJoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.162" data-path="WheelJoint.html">
            
                <a href="WheelJoint.html">
            
                    
                    WheelJoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.163" data-path="Widget.html">
            
                <a href="Widget.html">
            
                    
                    Widget
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.164" data-path="WorldManifold.html">
            
                <a href="WorldManifold.html">
            
                    
                    WorldManifold
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Enums</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="../enums/AccountGender.html">
            
                <a href="../enums/AccountGender.html">
            
                    
                    AccountGender
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="../enums/AccountOperate.html">
            
                <a href="../enums/AccountOperate.html">
            
                    
                    AccountOperate
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="../enums/AccountType.html">
            
                <a href="../enums/AccountType.html">
            
                    
                    AccountType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="../enums/AdsPos.html">
            
                <a href="../enums/AdsPos.html">
            
                    
                    AdsPos
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="../enums/AdsResultCode.html">
            
                <a href="../enums/AdsResultCode.html">
            
                    
                    AdsResultCode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="../enums/AdsType.html">
            
                <a href="../enums/AdsType.html">
            
                    
                    AdsType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="../enums/AnimationEventType.html">
            
                <a href="../enums/AnimationEventType.html">
            
                    
                    AnimationEventType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="../enums/audioEngine.AudioState.html">
            
                <a href="../enums/audioEngine.AudioState.html">
            
                    
                    audioEngine.AudioState
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="../enums/BlendFactor.html">
            
                <a href="../enums/BlendFactor.html">
            
                    
                    BlendFactor
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.10" data-path="../enums/Button.Transition.html">
            
                <a href="../enums/Button.Transition.html">
            
                    
                    Button.Transition
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.11" data-path="../enums/Camera.ClearFlags.html">
            
                <a href="../enums/Camera.ClearFlags.html">
            
                    
                    Camera.ClearFlags
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.12" data-path="../enums/CustomResultCode.html">
            
                <a href="../enums/CustomResultCode.html">
            
                    
                    CustomResultCode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.13" data-path="../enums/DebugMode.html">
            
                <a href="../enums/DebugMode.html">
            
                    
                    DebugMode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.14" data-path="../enums/DrawBits.html">
            
                <a href="../enums/DrawBits.html">
            
                    
                    DrawBits
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.15" data-path="../enums/EditBox.InputFlag.html">
            
                <a href="../enums/EditBox.InputFlag.html">
            
                    
                    EditBox.InputFlag
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.16" data-path="../enums/EditBox.InputMode.html">
            
                <a href="../enums/EditBox.InputMode.html">
            
                    
                    EditBox.InputMode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.17" data-path="../enums/EditBox.KeyboardReturnType.html">
            
                <a href="../enums/EditBox.KeyboardReturnType.html">
            
                    
                    EditBox.KeyboardReturnType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.18" data-path="../enums/Graphics.LineCap.html">
            
                <a href="../enums/Graphics.LineCap.html">
            
                    
                    Graphics.LineCap
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.19" data-path="../enums/Graphics.LineJoin.html">
            
                <a href="../enums/Graphics.LineJoin.html">
            
                    
                    Graphics.LineJoin
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.20" data-path="../enums/ImageFormat.html">
            
                <a href="../enums/ImageFormat.html">
            
                    
                    ImageFormat
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.21" data-path="../enums/KEY.html">
            
                <a href="../enums/KEY.html">
            
                    
                    KEY
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.22" data-path="../enums/Label.HorizontalAlign.html">
            
                <a href="../enums/Label.HorizontalAlign.html">
            
                    
                    Label.HorizontalAlign
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.23" data-path="../enums/Label.Overflow.html">
            
                <a href="../enums/Label.Overflow.html">
            
                    
                    Label.Overflow
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.24" data-path="../enums/Label.Type.html">
            
                <a href="../enums/Label.Type.html">
            
                    
                    Label.Type
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.25" data-path="../enums/Label.VerticalAlign.html">
            
                <a href="../enums/Label.VerticalAlign.html">
            
                    
                    Label.VerticalAlign
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.26" data-path="../enums/Layout.AxisDirection.html">
            
                <a href="../enums/Layout.AxisDirection.html">
            
                    
                    Layout.AxisDirection
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.27" data-path="../enums/Layout.HorizontalDirection.html">
            
                <a href="../enums/Layout.HorizontalDirection.html">
            
                    
                    Layout.HorizontalDirection
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.28" data-path="../enums/Layout.ResizeMode.html">
            
                <a href="../enums/Layout.ResizeMode.html">
            
                    
                    Layout.ResizeMode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.29" data-path="../enums/Layout.Type.html">
            
                <a href="../enums/Layout.Type.html">
            
                    
                    Layout.Type
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.30" data-path="../enums/Layout.VerticalDirection.html">
            
                <a href="../enums/Layout.VerticalDirection.html">
            
                    
                    Layout.VerticalDirection
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.31" data-path="../enums/LoadingItems.ItemState.html">
            
                <a href="../enums/LoadingItems.ItemState.html">
            
                    
                    LoadingItems.ItemState
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.32" data-path="../enums/macro.html">
            
                <a href="../enums/macro.html">
            
                    
                    macro
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.33" data-path="../enums/Mask.Type.html">
            
                <a href="../enums/Mask.Type.html">
            
                    
                    Mask.Type
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.34" data-path="../enums/NetworkType.html">
            
                <a href="../enums/NetworkType.html">
            
                    
                    NetworkType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.35" data-path="../enums/Node.EventType.html">
            
                <a href="../enums/Node.EventType.html">
            
                    
                    Node.EventType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.36" data-path="../enums/PageView.Direction.html">
            
                <a href="../enums/PageView.Direction.html">
            
                    
                    PageView.Direction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.37" data-path="../enums/PageView.EventType.html">
            
                <a href="../enums/PageView.EventType.html">
            
                    
                    PageView.EventType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.38" data-path="../enums/PageView.SizeMode.html">
            
                <a href="../enums/PageView.SizeMode.html">
            
                    
                    PageView.SizeMode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.39" data-path="../enums/PageViewIndicator.Direction.html">
            
                <a href="../enums/PageViewIndicator.Direction.html">
            
                    
                    PageViewIndicator.Direction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.40" data-path="../enums/ParticleSystem.EmitterMode.html">
            
                <a href="../enums/ParticleSystem.EmitterMode.html">
            
                    
                    ParticleSystem.EmitterMode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.41" data-path="../enums/ParticleSystem.PositionType.html">
            
                <a href="../enums/ParticleSystem.PositionType.html">
            
                    
                    ParticleSystem.PositionType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.42" data-path="../enums/PayResultCode.html">
            
                <a href="../enums/PayResultCode.html">
            
                    
                    PayResultCode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.43" data-path="../enums/Prefab.OptimizationPolicy.html">
            
                <a href="../enums/Prefab.OptimizationPolicy.html">
            
                    
                    Prefab.OptimizationPolicy
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.44" data-path="../enums/ProgressBar.Mode.html">
            
                <a href="../enums/ProgressBar.Mode.html">
            
                    
                    ProgressBar.Mode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.45" data-path="../enums/PushActionResultCode.html">
            
                <a href="../enums/PushActionResultCode.html">
            
                    
                    PushActionResultCode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.46" data-path="../enums/RayCastType.html">
            
                <a href="../enums/RayCastType.html">
            
                    
                    RayCastType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.47" data-path="../enums/RECResultCode.html">
            
                <a href="../enums/RECResultCode.html">
            
                    
                    RECResultCode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.48" data-path="../enums/RigidBodyType.html">
            
                <a href="../enums/RigidBodyType.html">
            
                    
                    RigidBodyType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.49" data-path="../enums/Scrollbar.Direction.html">
            
                <a href="../enums/Scrollbar.Direction.html">
            
                    
                    Scrollbar.Direction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.50" data-path="../enums/ScrollView.EventType.html">
            
                <a href="../enums/ScrollView.EventType.html">
            
                    
                    ScrollView.EventType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.51" data-path="../enums/ShareResultCode.html">
            
                <a href="../enums/ShareResultCode.html">
            
                    
                    ShareResultCode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.52" data-path="../enums/Slider.Direction.html">
            
                <a href="../enums/Slider.Direction.html">
            
                    
                    Slider.Direction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.53" data-path="../enums/SocialRetCode.html">
            
                <a href="../enums/SocialRetCode.html">
            
                    
                    SocialRetCode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.54" data-path="../enums/Sprite.FillType.html">
            
                <a href="../enums/Sprite.FillType.html">
            
                    
                    Sprite.FillType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.55" data-path="../enums/Sprite.SizeMode.html">
            
                <a href="../enums/Sprite.SizeMode.html">
            
                    
                    Sprite.SizeMode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.56" data-path="../enums/Sprite.Type.html">
            
                <a href="../enums/Sprite.Type.html">
            
                    
                    Sprite.Type
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.57" data-path="../enums/TaskType.html">
            
                <a href="../enums/TaskType.html">
            
                    
                    TaskType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.58" data-path="../enums/TextAlignment.html">
            
                <a href="../enums/TextAlignment.html">
            
                    
                    TextAlignment
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.59" data-path="../enums/Texture2D.Filter.html">
            
                <a href="../enums/Texture2D.Filter.html">
            
                    
                    Texture2D.Filter
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.60" data-path="../enums/Texture2D.PixelFormat.html">
            
                <a href="../enums/Texture2D.PixelFormat.html">
            
                    
                    Texture2D.PixelFormat
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.61" data-path="../enums/Texture2D.WrapMode.html">
            
                <a href="../enums/Texture2D.WrapMode.html">
            
                    
                    Texture2D.WrapMode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.62" data-path="../enums/TiledMap.Orientation.html">
            
                <a href="../enums/TiledMap.Orientation.html">
            
                    
                    TiledMap.Orientation
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.63" data-path="../enums/ToolBarPlace.html">
            
                <a href="../enums/ToolBarPlace.html">
            
                    
                    ToolBarPlace
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.64" data-path="../enums/UserActionResultCode.html">
            
                <a href="../enums/UserActionResultCode.html">
            
                    
                    UserActionResultCode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.65" data-path="../enums/VerticalTextAlignment.html">
            
                <a href="../enums/VerticalTextAlignment.html">
            
                    
                    VerticalTextAlignment
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.66" data-path="../enums/VideoPlayer.EventType.html">
            
                <a href="../enums/VideoPlayer.EventType.html">
            
                    
                    VideoPlayer.EventType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.67" data-path="../enums/VideoPlayer.ResourceType.html">
            
                <a href="../enums/VideoPlayer.ResourceType.html">
            
                    
                    VideoPlayer.ResourceType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.68" data-path="../enums/WebView.EventType.html">
            
                <a href="../enums/WebView.EventType.html">
            
                    
                    WebView.EventType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.69" data-path="../enums/Widget.AlignMode.html">
            
                <a href="../enums/Widget.AlignMode.html">
            
                    
                    Widget.AlignMode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.70" data-path="../enums/WrapMode.html">
            
                <a href="../enums/WrapMode.html">
            
                    
                    WrapMode
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Editor API</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="../editor/asset-db.html">
            
                <a href="../editor/asset-db.html">
            
                    
                    AssetDB
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Main Process</li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="../editor/main/editor.html">
            
                <a href="../editor/main/editor.html">
            
                    
                    Editor
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="../editor/main/console.html">
            
                <a href="../editor/main/console.html">
            
                    
                    Editor (Console Module)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="../editor/main/app.html">
            
                <a href="../editor/main/app.html">
            
                    
                    Editor.App
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="../editor/main/debugger.html">
            
                <a href="../editor/main/debugger.html">
            
                    
                    Editor.Debugger
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.5" data-path="../editor/main/devtools.html">
            
                <a href="../editor/main/devtools.html">
            
                    
                    Editor.DevTools
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.6" data-path="../editor/main/dialog.html">
            
                <a href="../editor/main/dialog.html">
            
                    
                    Editor.Dialog
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.7" data-path="../editor/main/ipc.html">
            
                <a href="../editor/main/ipc.html">
            
                    
                    Editor.Ipc
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.8" data-path="../editor/main/main-menu.html">
            
                <a href="../editor/main/main-menu.html">
            
                    
                    Editor.MainMenu
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.9" data-path="../editor/main/menu.html">
            
                <a href="../editor/main/menu.html">
            
                    
                    Editor.Menu
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.10" data-path="../editor/main/package.html">
            
                <a href="../editor/main/package.html">
            
                    
                    Editor.Package
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.11" data-path="../editor/main/panel.html">
            
                <a href="../editor/main/panel.html">
            
                    
                    Editor.Panel
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.12" data-path="../editor/main/profile.html">
            
                <a href="../editor/main/profile.html">
            
                    
                    Editor.Profile
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.13" data-path="../editor/main/protocol.html">
            
                <a href="../editor/main/protocol.html">
            
                    
                    Editor.Protocol
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.14" data-path="../editor/main/window.html">
            
                <a href="../editor/main/window.html">
            
                    
                    Editor.Window
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.15" data-path="../editor/main/worker.html">
            
                <a href="../editor/main/worker.html">
            
                    
                    Editor.Worker
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Renderer Process (Web Page)</li>
        
        
    
        <li class="chapter " data-level="6.1" data-path="../editor/renderer/editor.html">
            
                <a href="../editor/renderer/editor.html">
            
                    
                    Editor
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="../editor/renderer/console.html">
            
                <a href="../editor/renderer/console.html">
            
                    
                    Editor (Console Module)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="../editor/renderer/audio.md">
            
                <span>
            
                    
                    Editor.Audio
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="../editor/renderer/dialog.html">
            
                <a href="../editor/renderer/dialog.html">
            
                    
                    Editor.Dialog
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.5" data-path="../editor/renderer/ipc.html">
            
                <a href="../editor/renderer/ipc.html">
            
                    
                    Editor.Ipc
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.6" data-path="../editor/renderer/main-menu.html">
            
                <a href="../editor/renderer/main-menu.html">
            
                    
                    Editor.MainMenu
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.7" data-path="../editor/renderer/menu.html">
            
                <a href="../editor/renderer/menu.html">
            
                    
                    Editor.Menu
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.8" data-path="../editor/renderer/package.html">
            
                <a href="../editor/renderer/package.html">
            
                    
                    Editor.Package
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.9" data-path="../editor/renderer/panel.html">
            
                <a href="../editor/renderer/panel.html">
            
                    
                    Editor.Panel
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.10" data-path="../editor/renderer/protocol.html">
            
                <a href="../editor/renderer/protocol.html">
            
                    
                    Editor.Protocol
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.11" data-path="../editor/renderer/window.html">
            
                <a href="../editor/renderer/window.html">
            
                    
                    Editor.Window
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.12" data-path="../editor/renderer/ui/dom-utils.html">
            
                <a href="../editor/renderer/ui/dom-utils.html">
            
                    
                    Editor.UI (DOM Utils Module)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.13" data-path="../editor/renderer/ui/element-utils.html">
            
                <a href="../editor/renderer/ui/element-utils.html">
            
                    
                    Editor.UI (Element Utils Module)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.14" data-path="../editor/renderer/ui/focus-mgr.html">
            
                <a href="../editor/renderer/ui/focus-mgr.html">
            
                    
                    Editor.UI (Focus Module)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.15" data-path="../editor/renderer/ui/resource-mgr.html">
            
                <a href="../editor/renderer/ui/resource-mgr.html">
            
                    
                    Editor.UI (Resources Module)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.16" data-path="../editor/renderer/ui/settings.html">
            
                <a href="../editor/renderer/ui/settings.html">
            
                    
                    Editor.UI.Settings
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.17" data-path="../editor/renderer/ui/dock-utils.html">
            
                <a href="../editor/renderer/ui/dock-utils.html">
            
                    
                    Editor.UI.DockUtils
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.18" data-path="../editor/renderer/ui/drag-drop.html">
            
                <a href="../editor/renderer/ui/drag-drop.html">
            
                    
                    Editor.UI.DragDrop
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Modules for Both Processes</li>
        
        
    
        <li class="chapter " data-level="7.1" data-path="../editor/share/editor.html">
            
                <a href="../editor/share/editor.html">
            
                    
                    Editor
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2" data-path="../editor/share/easing.html">
            
                <a href="../editor/share/easing.html">
            
                    
                    Editor.Easing
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.3" data-path="../editor/share/ipc-listener.html">
            
                <a href="../editor/share/ipc-listener.html">
            
                    
                    Editor.IpcListener
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.4" data-path="../editor/share/js-utils.html">
            
                <a href="../editor/share/js-utils.html">
            
                    
                    Editor.JS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.5" data-path="../editor/share/math.html">
            
                <a href="../editor/share/math.html">
            
                    
                    Editor.Math
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.6" data-path="../editor/share/selection.html">
            
                <a href="../editor/share/selection.html">
            
                    
                    Editor.Selection
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.7" data-path="../editor/share/undo.html">
            
                <a href="../editor/share/undo.html">
            
                    
                    Editor.Undo
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.8" data-path="../editor/share/utils.html">
            
                <a href="../editor/share/utils.html">
            
                    
                    Editor.Utils
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.9" data-path="../editor/share/i18n.html">
            
                <a href="../editor/share/i18n.html">
            
                    
                    Editor.i18n
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        

    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
    <div class="page-wrapper" tabindex="-1" role="main">
            

<div class="cocos-navbar navbar-collapse clearfix" id="navbar" role="navigation">
    <ul class="nav navbar-nav">
        <li><a href="http://cocos.com" class="btn" target="_blank"><img src="http://forum.cocos.com/images/logo.png" height="30" /></a></li>
        <li><a href="#" class="btn autohide" onclick="toggleLanguage()">中文</a></li>

    
    <li>
        <a href="#" class="btn autohide"><i class="fa fa-book"></i>Cocos Creator</a>
        <ul class="hovershow">
            
            <li><a href="http://docs.cocos.com/creator/manual/en" class="btn">Manual</a></li>
            
            <li><a href="http://docs.cocos.com/creator/api/en" class="btn">API Ref</a></li>
            
        </ul>
    </li>                
    

    
    <li>
        <a href="#" class="btn autohide"><i class="fa fa-book"></i>Cocos2d-x</a>
        <ul class="hovershow">
            
            <li><a href="http://docs.cocos.com/cocos2d-x/manual/en/" class="btn">Manual</a></li>
            
            <li><a href="http://www.cocos2d-x.org/docs/api-ref/index.html" class="btn">API Ref</a></li>
            
        </ul>
    </li>                
    

    
    <li><a href="http://docs.anysdk.com/" class="btn autohide"><i class="fa fa-book"></i>AnySDK</a></li>
    


    
    <li class="version-link">
        <a class="btn" style="color:#444">Version: <span style="font-weight:bold">2.0 Preview</span></a>
        <ul class="hovershow">
            
            <li><a href="http://docs.cocos.com/creator/api/en" class="btn">Version: <span style="font-weight:bold">1.x</span></a></li>
            
            <li><a href="http://docs.cocos.com/creator/api/2.0/en" class="btn">Version: <span style="font-weight:bold">2.0 Preview</span></a></li>
            
        </ul>
    </li>                
    
      
    </ul>
</div>
<div class="book-header" role="navigation">
    
    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >loader</a>
    </h1>
</div>



        <div class="page-inner">
            
                <section class="normal markdown-section">
                
                <h2 id="loader-class"><code>loader</code> Class</h2>
<p>Extends <a href="Pipeline.html"><code>Pipeline</code></a></p>
<p>Module: <a href="../modules/cc.html">cc</a></p>
<p>Loader for resource loading process. It&apos;s a singleton object.</p>
<h3 id="index">Index</h3>
<h5 id="properties">Properties</h5>
<ul>
<li><a href="#assetloader"><code>assetLoader</code></a> <code>Object</code> </li>
<li><a href="#downloader"><code>downloader</code></a> <code>Object</code> </li>
<li><a href="#loader"><code>loader</code></a> <code>Object</code> </li>
</ul>
<h5 id="methods">Methods</h5>
<ul>
<li><a href="#getxmlhttprequest"><code>getXMLHttpRequest</code></a> </li>
<li><a href="#adddownloadhandlers"><code>addDownloadHandlers</code></a> </li>
<li><a href="#addloadhandlers"><code>addLoadHandlers</code></a> </li>
<li><a href="#load"><code>load</code></a> </li>
<li><a href="#loadres"><code>loadRes</code></a> </li>
<li><a href="#loadresarray"><code>loadResArray</code></a> </li>
<li><a href="#loadresdir"><code>loadResDir</code></a> </li>
<li><a href="#getres"><code>getRes</code></a> </li>
<li><a href="#getdependsrecursively"><code>getDependsRecursively</code></a> </li>
<li><a href="#release"><code>release</code></a> </li>
<li><a href="#releaseasset"><code>releaseAsset</code></a> </li>
<li><a href="#releaseres"><code>releaseRes</code></a> </li>
<li><a href="#releaseresdir"><code>releaseResDir</code></a> </li>
<li><a href="#releaseall"><code>releaseAll</code></a> </li>
<li><a href="#setautorelease"><code>setAutoRelease</code></a> </li>
<li><a href="#setautoreleaserecursively"><code>setAutoReleaseRecursively</code></a> </li>
<li><a href="#isautorelease"><code>isAutoRelease</code></a> </li>
<li><a href="#constructor"><code>constructor</code></a> </li>
<li><a href="#insertpipe"><code>insertPipe</code></a> </li>
<li><a href="#insertpipeafter"><code>insertPipeAfter</code></a> </li>
<li><a href="#appendpipe"><code>appendPipe</code></a> </li>
<li><a href="#flowin"><code>flowIn</code></a> </li>
<li><a href="#copyitemstates"><code>copyItemStates</code></a> </li>
<li><a href="#getitem"><code>getItem</code></a> </li>
<li><a href="#removeitem"><code>removeItem</code></a> </li>
<li><a href="#clear"><code>clear</code></a> </li>
</ul>
<h3 id="details">Details</h3>
<h4 id="properties">Properties</h4>
<h5 id="assetloader">assetLoader</h5>
<blockquote>
<p>The asset loader in cc.loader&apos;s pipeline, it&apos;s by default the first pipe.
It&apos;s used to identify an asset&apos;s type, and determine how to download it.</p>
</blockquote>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Type</td>
<td><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
</tr>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L100" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:100</a></td>
</tr>
</tbody>
</table>
<h5 id="downloader">downloader</h5>
<blockquote>
<p>The downloader in cc.loader&apos;s pipeline, it&apos;s by default the second pipe.
It&apos;s used to download files with several handlers: pure text, image, script, audio, font, uuid.
You can add your own download function with addDownloadHandlers</p>
</blockquote>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Type</td>
<td><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
</tr>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L108" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:108</a></td>
</tr>
</tbody>
</table>
<h5 id="loader">loader</h5>
<blockquote>
<p>The downloader in cc.loader&apos;s pipeline, it&apos;s by default the third pipe.
It&apos;s used to parse downloaded content with several handlers: JSON, image, plist, fnt, uuid.
You can add your own download function with addLoadHandlers</p>
</blockquote>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Type</td>
<td><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
</tr>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L117" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:117</a></td>
</tr>
</tbody>
</table>
<!-- Method Block -->
<h4 id="methods">Methods</h4>
<h5 id="getxmlhttprequest">getXMLHttpRequest</h5>
<p>Gets a new XMLHttpRequest instance.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Returns</td>
<td>XMLHttpRequest </td>
</tr>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L147" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:147</a></td>
</tr>
</tbody>
</table>
<h5 id="adddownloadhandlers">addDownloadHandlers</h5>
<p>Add custom supported types handler or modify existing type handler for download process.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L154" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:154</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>extMap</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> Custom supported types with corresponded handler</li>
</ul>
<h5 id="examples">Examples</h5>
<pre><code class="lang-js">cc.loader.addDownloadHandlers({
     <span class="hljs-comment">// This will match all url with `.scene` extension or all url with `scene` type</span>
     <span class="hljs-string">&apos;scene&apos;</span> : <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">url, callback</span>) </span>{}
 });
</code></pre>
<h5 id="addloadhandlers">addLoadHandlers</h5>
<p>Add custom supported types handler or modify existing type handler for load process.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L168" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:168</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>extMap</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> Custom supported types with corresponded handler</li>
</ul>
<h5 id="examples">Examples</h5>
<pre><code class="lang-js">cc.loader.addLoadHandlers({
     <span class="hljs-comment">// This will match all url with `.scene` extension or all url with `scene` type</span>
     <span class="hljs-string">&apos;scene&apos;</span> : <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">url, callback</span>) </span>{}
 });
</code></pre>
<h5 id="load">load</h5>
<p>Load resources with a progression callback and a complete callback.
The progression callback is the same as Pipeline&apos;s <a href="LoadingItems.html#method_onProgress" class="crosslink">onProgress</a>
The complete callback is almost the same as Pipeline&apos;s <a href="LoadingItems.html#method_onComplete" class="crosslink">onComplete</a>
The only difference is when user pass a single url as resources, the complete callback will set its result directly as the second parameter.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L182" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:182</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>resources</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String[]</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> Url list in an array</li>
<li><code>progressCallback</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> Callback invoked when progression change<ul>
<li><code>completedCount</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a> The number of the items that are already completed</li>
<li><code>totalCount</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a> The total number of the items</li>
<li><code>item</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> The latest item which flow out the pipeline</li>
</ul>
</li>
<li><code>completeCallback</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> Callback invoked when all resources loaded</li>
</ul>
<h5 id="examples">Examples</h5>
<pre><code class="lang-js">cc.loader.load(<span class="hljs-string">&apos;a.png&apos;</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">err, tex</span>) </span>{
    cc.log(<span class="hljs-string">&apos;Result should be a texture: &apos;</span> + (tex <span class="hljs-keyword">instanceof</span> cc.Texture2D));
});

cc.loader.load(<span class="hljs-string">&apos;http://example.com/a.png&apos;</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">err, tex</span>) </span>{
    cc.log(<span class="hljs-string">&apos;Should load a texture from external url: &apos;</span> + (tex <span class="hljs-keyword">instanceof</span> cc.Texture2D));
});

cc.loader.load({url: <span class="hljs-string">&apos;http://example.com/getImageREST?file=a.png&apos;</span>, type: <span class="hljs-string">&apos;png&apos;</span>}, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">err, tex</span>) </span>{
    cc.log(<span class="hljs-string">&apos;Should load a texture from RESTful API by specify the type: &apos;</span> + (tex <span class="hljs-keyword">instanceof</span> cc.Texture2D));
});

cc.loader.load([<span class="hljs-string">&apos;a.png&apos;</span>, <span class="hljs-string">&apos;b.json&apos;</span>], <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">errors, results</span>) </span>{
    <span class="hljs-keyword">if</span> (errors) {
        <span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>; i &lt; errors.length; i++) {
            cc.log(<span class="hljs-string">&apos;Error url [&apos;</span> + errors[i] + <span class="hljs-string">&apos;]: &apos;</span> + results.getError(errors[i]));
        }
    }
    <span class="hljs-keyword">var</span> aTex = results.getContent(<span class="hljs-string">&apos;a.png&apos;</span>);
    <span class="hljs-keyword">var</span> bJsonObj = results.getContent(<span class="hljs-string">&apos;b.json&apos;</span>);
});
</code></pre>
<h5 id="loadres">loadRes</h5>
<p>Load resources from the &quot;resources&quot; folder inside the &quot;assets&quot; folder of your project.<br>
<br>
Note: All asset URLs in Creator use forward slashes, URLs using backslashes will not work.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L402" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:402</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>url</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> Url of the target resource.<pre><code>                The url is relative to the &quot;resources&quot; folder, extensions must be omitted.
</code></pre></li>
<li><code>type</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> Only asset of type will be loaded if this argument is supplied.</li>
<li><code>progressCallback</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> Callback invoked when progression change.<ul>
<li><code>completedCount</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a> The number of the items that are already completed.</li>
<li><code>totalCount</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a> The total number of the items.</li>
<li><code>item</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> The latest item which flow out the pipeline.</li>
</ul>
</li>
<li><code>completeCallback</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> Callback invoked when the resource loaded.<ul>
<li><code>error</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error" class="crosslink external" target="_blank">Error</a> The error info or null if loaded successfully.</li>
<li><code>resource</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> The loaded resource if it can be found otherwise returns null.</li>
</ul>
</li>
</ul>
<h5 id="examples">Examples</h5>
<pre><code class="lang-js"><span class="hljs-comment">// load the prefab (project/assets/resources/misc/character/cocos) from resources folder</span>
cc.loader.loadRes(<span class="hljs-string">&apos;misc/character/cocos&apos;</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">err, prefab</span>) </span>{
    <span class="hljs-keyword">if</span> (err) {
        cc.error(err.message || err);
        <span class="hljs-keyword">return</span>;
    }
    cc.log(<span class="hljs-string">&apos;Result should be a prefab: &apos;</span> + (prefab <span class="hljs-keyword">instanceof</span> cc.Prefab));
});

<span class="hljs-comment">// load the sprite frame of (project/assets/resources/imgs/cocos.png) from resources folder</span>
cc.loader.loadRes(<span class="hljs-string">&apos;imgs/cocos&apos;</span>, cc.SpriteFrame, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">err, spriteFrame</span>) </span>{
    <span class="hljs-keyword">if</span> (err) {
        cc.error(err.message || err);
        <span class="hljs-keyword">return</span>;
    }
    cc.log(<span class="hljs-string">&apos;Result should be a sprite frame: &apos;</span> + (spriteFrame <span class="hljs-keyword">instanceof</span> cc.SpriteFrame));
});
</code></pre>
<h5 id="loadresarray">loadResArray</h5>
<p>This method is like <a href="loader.html#method_loadRes" class="crosslink">loadRes</a> except that it accepts array of url.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L525" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:525</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>urls</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String[]</a> Array of URLs of the target resource.<pre><code>                   The url is relative to the &quot;resources&quot; folder, extensions must be omitted.
</code></pre></li>
<li><code>type</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> Only asset of type will be loaded if this argument is supplied.</li>
<li><code>progressCallback</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> Callback invoked when progression change.<ul>
<li><code>completedCount</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a> The number of the items that are already completed.</li>
<li><code>totalCount</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a> The total number of the items.</li>
<li><code>item</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> The latest item which flow out the pipeline.</li>
</ul>
</li>
<li><code>completeCallback</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> A callback which is called when all assets have been loaded, or an error occurs.<ul>
<li><code>error</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error" class="crosslink external" target="_blank">Error</a> If one of the asset failed, the complete callback is immediately called<pre><code>                              with the error. If all assets are loaded successfully, error will be null.
</code></pre></li>
<li><code>assets</code> <a href="Asset.html" class="crosslink">Asset[]</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a> An array of all loaded assets.<pre><code>                                          If nothing to load, assets will be an empty array.
</code></pre></li>
</ul>
</li>
</ul>
<h5 id="examples">Examples</h5>
<pre><code class="lang-js"><span class="hljs-comment">// load the SpriteFrames from resources folder</span>
<span class="hljs-keyword">var</span> spriteFrames;
<span class="hljs-keyword">var</span> urls = [<span class="hljs-string">&apos;misc/characters/character_01&apos;</span>, <span class="hljs-string">&apos;misc/weapons/weapons_01&apos;</span>];
cc.loader.loadResArray(urls, cc.SpriteFrame, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">err, assets</span>) </span>{
    <span class="hljs-keyword">if</span> (err) {
        cc.error(err);
        <span class="hljs-keyword">return</span>;
    }
    spriteFrames = assets;
    <span class="hljs-comment">// ...</span>
});
</code></pre>
<h5 id="loadresdir">loadResDir</h5>
<p>Load all assets in a folder inside the &quot;assets/resources&quot; folder of your project.<br>
<br>
Note: All asset URLs in Creator use forward slashes, URLs using backslashes will not work.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L583" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:583</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>url</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> Url of the target folder.<pre><code>                The url is relative to the &quot;resources&quot; folder, extensions must be omitted.
</code></pre></li>
<li><code>type</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> Only asset of type will be loaded if this argument is supplied.</li>
<li><code>progressCallback</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> Callback invoked when progression change.<ul>
<li><code>completedCount</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a> The number of the items that are already completed.</li>
<li><code>totalCount</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a> The total number of the items.</li>
<li><code>item</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> The latest item which flow out the pipeline.</li>
</ul>
</li>
<li><code>completeCallback</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> A callback which is called when all assets have been loaded, or an error occurs.<ul>
<li><code>error</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error" class="crosslink external" target="_blank">Error</a> If one of the asset failed, the complete callback is immediately called<pre><code>                              with the error. If all assets are loaded successfully, error will be null.
</code></pre></li>
<li><code>assets</code> <a href="Asset.html" class="crosslink">Asset[]</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a> An array of all loaded assets.<pre><code>                                  If nothing to load, assets will be an empty array.
</code></pre></li>
<li><code>urls</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String[]</a> An array that lists all the URLs of loaded assets.</li>
</ul>
</li>
</ul>
<h5 id="examples">Examples</h5>
<pre><code class="lang-js"><span class="hljs-comment">// load the texture (resources/imgs/cocos.png) and the corresponding sprite frame</span>
cc.loader.loadResDir(<span class="hljs-string">&apos;imgs/cocos&apos;</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">err, assets</span>) </span>{
    <span class="hljs-keyword">if</span> (err) {
        cc.error(err);
        <span class="hljs-keyword">return</span>;
    }
    <span class="hljs-keyword">var</span> texture = assets[<span class="hljs-number">0</span>];
    <span class="hljs-keyword">var</span> spriteFrame = assets[<span class="hljs-number">1</span>];
});

<span class="hljs-comment">// load all textures in &quot;resources/imgs/&quot;</span>
cc.loader.loadResDir(<span class="hljs-string">&apos;imgs&apos;</span>, cc.Texture2D, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">err, textures</span>) </span>{
    <span class="hljs-keyword">var</span> texture1 = textures[<span class="hljs-number">0</span>];
    <span class="hljs-keyword">var</span> texture2 = textures[<span class="hljs-number">1</span>];
});

<span class="hljs-comment">// load all JSONs in &quot;resources/data/&quot;</span>
cc.loader.loadResDir(<span class="hljs-string">&apos;data&apos;</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">err, objects, urls</span>) </span>{
    <span class="hljs-keyword">var</span> data = objects[<span class="hljs-number">0</span>];
    <span class="hljs-keyword">var</span> url = urls[<span class="hljs-number">0</span>];
});
</code></pre>
<h5 id="getres">getRes</h5>
<p>Get resource data by id. <br>
When you load resources with <a href="loader.html#method_load" class="crosslink">load</a> or <a href="loader.html#method_loadRes" class="crosslink">loadRes</a>,
the url will be the unique identity of the resource.
After loaded, you can acquire them by passing the url to this API.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Returns</td>
<td>Any </td>
</tr>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L645" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:645</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>url</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> </li>
<li><code>type</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> Only asset of type will be returned if this argument is supplied.</li>
</ul>
<h5 id="getdependsrecursively">getDependsRecursively</h5>
<p>Get all resource dependencies of the requested asset in an array, including itself.
The owner parameter accept the following types: 1. The asset itself; 2. The resource url; 3. The asset&apos;s uuid.<br>
The returned array stores the dependencies with their uuids, after retrieve dependencies,
you can release them, access dependent assets by passing the uuid to <a href="loader.html#method_getRes" class="crosslink">getRes</a>, or other stuffs you want.<br>
For release all dependencies of an asset, please refer to <a href="loader.html#method_release" class="crosslink">release</a>
Here is some examples:</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Returns</td>
<td><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a> </td>
</tr>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L682" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:682</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>owner</code> <a href="Asset.html" class="crosslink">Asset</a> | <a href="RawAsset.html" class="crosslink">RawAsset</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> The owner asset or the resource url or the asset&apos;s uuid</li>
</ul>
<h5 id="examples">Examples</h5>
<pre><code class="lang-js"><span class="hljs-comment">// Release all dependencies of a loaded prefab</span>
<span class="hljs-keyword">var</span> deps = cc.loader.getDependsRecursively(prefab);
cc.loader.release(deps);
<span class="hljs-comment">// Retrieve all dependent textures</span>
<span class="hljs-keyword">var</span> deps = cc.loader.getDependsRecursively(<span class="hljs-string">&apos;prefabs/sample&apos;</span>);
<span class="hljs-keyword">var</span> textures = [];
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>; i &lt; deps.length; ++i) {
    <span class="hljs-keyword">var</span> item = cc.loader.getRes(deps[i]);
    <span class="hljs-keyword">if</span> (item <span class="hljs-keyword">instanceof</span> cc.Texture2D) {
        textures.push(item);
    }
}
</code></pre>
<h5 id="release">release</h5>
<p>Release the content of an asset or an array of assets by uuid.
Start from v1.3, this method will not only remove the cache of the asset in loader, but also clean up its content.
For example, if you release a texture, the texture asset and its gl texture data will be freed up.
In complexe project, you can use this function with <a href="loader.html#method_getDependsRecursively" class="crosslink">getDependsRecursively</a> to free up memory in critical circumstances.
Notice, this method may cause the texture to be unusable, if there are still other nodes use the same texture, they may turn to black and report gl errors.
If you only want to remove the cache of an asset, please use Pipeline/removeItem:method</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L723" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:723</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>asset</code> <a href="Asset.html" class="crosslink">Asset</a> | <a href="RawAsset.html" class="crosslink">RawAsset</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a> </li>
</ul>
<h5 id="examples">Examples</h5>
<pre><code class="lang-js"><span class="hljs-comment">// Release a texture which is no longer need</span>
cc.loader.release(texture);
<span class="hljs-comment">// Release all dependencies of a loaded prefab</span>
<span class="hljs-keyword">var</span> deps = cc.loader.getDependsRecursively(<span class="hljs-string">&apos;prefabs/sample&apos;</span>);
cc.loader.release(deps);
<span class="hljs-comment">// If there is no instance of this prefab in the scene, the prefab and its dependencies like textures, sprite frames, etc, will be freed up.</span>
<span class="hljs-comment">// If you have some other nodes share a texture in this prefab, you can skip it in two ways:</span>
<span class="hljs-comment">// 1. Forbid auto release a texture before release</span>
cc.loader.setAutoRelease(texture2d, <span class="hljs-literal">false</span>);
<span class="hljs-comment">// 2. Remove it from the dependencies array</span>
<span class="hljs-keyword">var</span> deps = cc.loader.getDependsRecursively(<span class="hljs-string">&apos;prefabs/sample&apos;</span>);
<span class="hljs-keyword">var</span> index = deps.indexOf(texture2d._uuid);
<span class="hljs-keyword">if</span> (index !== <span class="hljs-number">-1</span>)
    deps.splice(index, <span class="hljs-number">1</span>);
cc.loader.release(deps);
</code></pre>
<h5 id="releaseasset">releaseAsset</h5>
<p>Release the asset by its object. Refer to <a href="loader.html#method_release" class="crosslink">release</a> for detailed informations.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L786" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:786</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>asset</code> <a href="Asset.html" class="crosslink">Asset</a> </li>
</ul>
<h5 id="releaseres">releaseRes</h5>
<p>Release the asset loaded by <a href="loader.html#method_loadRes" class="crosslink">loadRes</a>. Refer to <a href="loader.html#method_release" class="crosslink">release</a> for detailed informations.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L800" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:800</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>url</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> </li>
<li><code>type</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> Only asset of type will be released if this argument is supplied.</li>
</ul>
<h5 id="releaseresdir">releaseResDir</h5>
<p>Release the all assets loaded by <a href="loader.html#method_loadResDir" class="crosslink">loadResDir</a>. Refer to <a href="loader.html#method_release" class="crosslink">release</a> for detailed informations.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L818" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:818</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>url</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> </li>
<li><code>type</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a> Only asset of type will be released if this argument is supplied.</li>
</ul>
<h5 id="releaseall">releaseAll</h5>
<p>Resource all assets. Refer to <a href="loader.html#method_release" class="crosslink">release</a> for detailed informations.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L834" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:834</a></td>
</tr>
</tbody>
</table>
<h5 id="setautorelease">setAutoRelease</h5>
<p>Indicates whether to release the asset when loading a new scene.<br>
By default, when loading a new scene, all assets in the previous scene will be released or preserved
according to whether the previous scene checked the &quot;Auto Release Assets&quot; option.
On the other hand, assets dynamically loaded by using <code>cc.loader.loadRes</code> or <code>cc.loader.loadResDir</code>
will not be affected by that option, remain not released by default.<br>
Use this API to change the default behavior on a single asset, to force preserve or release specified asset when scene switching.<br>
<br>
See: <a href="loader.html#method_setAutoReleaseRecursively" class="crosslink">cc.loader.setAutoReleaseRecursively</a>, <a href="loader.html#method_isAutoRelease" class="crosslink">cc.loader.isAutoRelease</a></p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L855" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:855</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>assetOrUrlOrUuid</code> <a href="Asset.html" class="crosslink">Asset</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> asset object or the raw asset&apos;s url or uuid</li>
<li><code>autoRelease</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a> indicates whether should release automatically</li>
</ul>
<h5 id="examples">Examples</h5>
<pre><code class="lang-js"><span class="hljs-comment">// auto release the texture event if &quot;Auto Release Assets&quot; disabled in current scene</span>
cc.loader.setAutoRelease(texture2d, <span class="hljs-literal">true</span>);
<span class="hljs-comment">// don&apos;t release the texture even if &quot;Auto Release Assets&quot; enabled in current scene</span>
cc.loader.setAutoRelease(texture2d, <span class="hljs-literal">false</span>);
<span class="hljs-comment">// first parameter can be url</span>
cc.loader.setAutoRelease(audioUrl, <span class="hljs-literal">false</span>);
</code></pre>
<h5 id="setautoreleaserecursively">setAutoReleaseRecursively</h5>
<p>Indicates whether to release the asset and its referenced other assets when loading a new scene.<br>
By default, when loading a new scene, all assets in the previous scene will be released or preserved
according to whether the previous scene checked the &quot;Auto Release Assets&quot; option.
On the other hand, assets dynamically loaded by using <code>cc.loader.loadRes</code> or <code>cc.loader.loadResDir</code>
will not be affected by that option, remain not released by default.<br>
Use this API to change the default behavior on the specified asset and its recursively referenced assets, to force preserve or release specified asset when scene switching.<br>
<br>
See: <a href="loader.html#method_setAutoRelease" class="crosslink">cc.loader.setAutoRelease</a>, <a href="loader.html#method_isAutoRelease" class="crosslink">cc.loader.isAutoRelease</a></p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L895" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:895</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>assetOrUrlOrUuid</code> <a href="Asset.html" class="crosslink">Asset</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> asset object or the raw asset&apos;s url or uuid</li>
<li><code>autoRelease</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a> indicates whether should release automatically</li>
</ul>
<h5 id="examples">Examples</h5>
<pre><code class="lang-js"><span class="hljs-comment">// auto release the SpriteFrame and its Texture event if &quot;Auto Release Assets&quot; disabled in current scene</span>
cc.loader.setAutoReleaseRecursively(spriteFrame, <span class="hljs-literal">true</span>);
<span class="hljs-comment">// don&apos;t release the SpriteFrame and its Texture even if &quot;Auto Release Assets&quot; enabled in current scene</span>
cc.loader.setAutoReleaseRecursively(spriteFrame, <span class="hljs-literal">false</span>);
<span class="hljs-comment">// don&apos;t release the Prefab and all the referenced assets</span>
cc.loader.setAutoReleaseRecursively(prefab, <span class="hljs-literal">false</span>);
</code></pre>
<h5 id="isautorelease">isAutoRelease</h5>
<p>Returns whether the asset is configured as auto released, despite how &quot;Auto Release Assets&quot; property is set on scene asset.<br>
<br>
See: <a href="loader.html#method_setAutoRelease" class="crosslink">cc.loader.setAutoRelease</a>, <a href="loader.html#method_setAutoReleaseRecursively" class="crosslink">cc.loader.setAutoReleaseRecursively</a></p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Returns</td>
<td><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a> </td>
</tr>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/CCLoader.js#L943" target="_blank">cocos2d/core/load-pipeline/CCLoader.js:943</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>assetOrUrl</code> <a href="Asset.html" class="crosslink">Asset</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> asset object or the raw asset&apos;s url</li>
</ul>
<h5 id="constructor">constructor</h5>
<p>Constructor, pass an array of pipes to construct a new Pipeline,
the pipes will be chained in the given order.<br>
A pipe is an object which must contain an <code>id</code> in string and a <code>handle</code> function,
the id must be unique in the pipeline.<br>
It can also include <code>async</code> property to identify whether it&apos;s an asynchronous process.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/pipeline.js#L112" target="_blank">cocos2d/core/load-pipeline/pipeline.js:112</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>pipes</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a> </li>
</ul>
<h5 id="examples">Examples</h5>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> pipeline = <span class="hljs-keyword">new</span> Pipeline([
     {
         id: <span class="hljs-string">&apos;Downloader&apos;</span>,
         handle: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">item, callback</span>) </span>{},
         <span class="hljs-keyword">async</span>: <span class="hljs-literal">true</span>
     },
     {id: <span class="hljs-string">&apos;Parser&apos;</span>, handle: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">item</span>) </span>{}, <span class="hljs-keyword">async</span>: <span class="hljs-literal">false</span>}
 ]);
</code></pre>
<h5 id="insertpipe">insertPipe</h5>
<p>Insert a new pipe at the given index of the pipeline. <br>
A pipe must contain an <code>id</code> in string and a <code>handle</code> function, the id must be unique in the pipeline.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/pipeline.js#L156" target="_blank">cocos2d/core/load-pipeline/pipeline.js:156</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>pipe</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> The pipe to be inserted</li>
<li><code>index</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a> The index to insert</li>
</ul>
<h5 id="insertpipeafter">insertPipeAfter</h5>
<p>!en
Insert a pipe to the end of an existing pipe. The existing pipe must be a valid pipe in the pipeline.
!zh
&#x5728;&#x5F53;&#x524D; pipeline &#x7684;&#x4E00;&#x4E2A;&#x5DF2;&#x77E5; pipe &#x540E;&#x9762;&#x63D2;&#x5165;&#x4E00;&#x4E2A;&#x65B0;&#x7684; pipe&#x3002;</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/pipeline.js#L199" target="_blank">cocos2d/core/load-pipeline/pipeline.js:199</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>refPipe</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> An existing pipe in the pipeline.</li>
<li><code>newPipe</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> The pipe to be inserted.</li>
</ul>
<h5 id="appendpipe">appendPipe</h5>
<p>Add a new pipe at the end of the pipeline. <br>
A pipe must contain an <code>id</code> in string and a <code>handle</code> function, the id must be unique in the pipeline.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/pipeline.js#L216" target="_blank">cocos2d/core/load-pipeline/pipeline.js:216</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>pipe</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> The pipe to be appended</li>
</ul>
<h5 id="flowin">flowIn</h5>
<p>Let new items flow into the pipeline. <br>
Each item can be a simple url string or an object,
if it&apos;s an object, it must contain <code>id</code> property. <br>
You can specify its type by <code>type</code> property, by default, the type is the extension name in url. <br>
By adding a <code>skips</code> property including pipe ids, you can skip these pipe. <br>
The object can contain any supplementary property as you want. <br></p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/pipeline.js#L240" target="_blank">cocos2d/core/load-pipeline/pipeline.js:240</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>items</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a> </li>
</ul>
<h5 id="examples">Examples</h5>
<pre><code class="lang-js">pipeline.flowIn([
     <span class="hljs-string">&apos;res/Background.png&apos;</span>,
     {
         id: <span class="hljs-string">&apos;res/scene.json&apos;</span>,
         type: <span class="hljs-string">&apos;scene&apos;</span>,
         name: <span class="hljs-string">&apos;scene&apos;</span>,
         skips: [<span class="hljs-string">&apos;Downloader&apos;</span>]
     }
 ]);
</code></pre>
<h5 id="copyitemstates">copyItemStates</h5>
<p>Copy the item states from one source item to all destination items. <br>
It&apos;s quite useful when a pipe generate new items from one source item,<br>
then you should flowIn these generated items into pipeline, <br>
but you probably want them to skip all pipes the source item already go through,<br>
you can achieve it with this API. <br>
<br>
For example, an unzip pipe will generate more items, but you won&apos;t want them to pass unzip or download pipe again.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/pipeline.js#L325" target="_blank">cocos2d/core/load-pipeline/pipeline.js:325</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>srcItem</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> The source item</li>
<li><code>dstItems</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> A single destination item or an array of destination items</li>
</ul>
<h5 id="getitem">getItem</h5>
<p>Returns an item in pipeline.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Returns</td>
<td><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> </td>
</tr>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/pipeline.js#L354" target="_blank">cocos2d/core/load-pipeline/pipeline.js:354</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>id</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> The id of the item</li>
</ul>
<h5 id="removeitem">removeItem</h5>
<p>Removes an completed item in pipeline.
It will only remove the cache in the pipeline or loader, its dependencies won&apos;t be released.
cc.loader provided another method to completely cleanup the resource and its dependencies,
please refer to <a href="loader.html#method_release" class="crosslink">cc.loader.release</a></p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Returns</td>
<td><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a> </td>
</tr>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/pipeline.js#L374" target="_blank">cocos2d/core/load-pipeline/pipeline.js:374</a></td>
</tr>
</tbody>
</table>
<h6 id="parameters">Parameters</h6>
<ul>
<li><code>id</code> <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> The id of the item</li>
</ul>
<h5 id="clear">clear</h5>
<p>Clear the current pipeline, this function will clean up the items.</p>
<table>
<thead>
<tr>
<th>meta</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Defined in</td>
<td><a href="https://github.com/cocos-creator/engine/blob/8f14bc42a40e57c2d3b846c4f7f26f1a1753232c/cocos2d/core/load-pipeline/pipeline.js#L394" target="_blank">cocos2d/core/load-pipeline/pipeline.js:394</a></td>
</tr>
</tbody>
</table>

                
                </section>
            
        </div>
    </div>

            </div>

            
                
                <a href="Layout.html" class="navigation navigation-prev " aria-label="Previous page: Layout">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="LoadingItems.html" class="navigation navigation-next " aria-label="Next page: LoadingItems">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"loader","level":"2.62","depth":1,"next":{"title":"LoadingItems","level":"2.63","depth":1,"path":"classes/LoadingItems.md","ref":"classes/LoadingItems.md","articles":[]},"previous":{"title":"Layout","level":"2.61","depth":1,"path":"classes/Layout.md","ref":"classes/Layout.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-lunr","-search","search-title","github-issue-feedback-language-custom","anchorjs","sharing","splitter"],"styles":{"website":"./styles/website.css"},"pluginsConfig":{"livereload":{},"splitter":{},"search":{"maxIndexSize":100000000},"lunr":{"maxIndexSize":100000000},"fontsettings":{"theme":"white","family":"sans","size":2},"search-title":{},"highlight":{},"sharing":{"qq":true,"all":["facebook","google","twitter","weibo","instapaper"],"douban":false,"facebook":true,"weibo":true,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":false,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"github-issue-feedback-language-custom":{"repo":"cocos-creator/creator-api-docs","branch":"master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchorjs":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"index.md","glossary":"GLOSSARY.md","summary":"index.md"},"variables":{"products":[{"name":"Cocos Creator","links":[{"name":"Manual","link":"http://docs.cocos.com/creator/manual/en"},{"name":"API Ref","link":"http://docs.cocos.com/creator/api/en"}]},{"name":"Cocos2d-x","links":[{"name":"Manual","link":"http://docs.cocos.com/cocos2d-x/manual/en/"},{"name":"API Ref","link":"http://www.cocos2d-x.org/docs/api-ref/index.html"}]},{"name":"AnySDK","link":"http://docs.anysdk.com/"}],"version":[{"name":"2.0 Preview","links":[{"name":"1.x","link":"http://docs.cocos.com/creator/api/en"},{"name":"2.0 Preview","link":"http://docs.cocos.com/creator/api/2.0/en"}]}]},"language":"en","gitbook":"*"},"file":{"path":"classes/loader.md","mtime":"2018-06-12T08:14:47.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-06-12T08:19:29.814Z"},"basePath":"..","book":{"language":"en"}});
        });
    </script>
</div>

        
    
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search-title/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-title/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-github-issue-feedback-language-custom/plugin.js"></script>
        
    
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-anchorjs/anchor-style.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    <script type="text/javascript">
    function toggleLanguage () {
        var path = location.href;
        // console.log(path);
        if (path.indexOf('/zh') !== -1) {
            path = path.replace(/\/zh[\/$\s]/i, '/en/');
        } else if (path.indexOf('/en') !== -1) {
            path = path.replace(/\/en[\/$\s]/i, '/zh/');
        }
        // console.log('after: ' + path);    
        location.assign(path);
    }

    // this method is used to avoid the possibility of failure of the URL's anchor on WAN
    function makeSureAnchorJumped () {
        var anchor = window.location.href.split('#')[1];
        if (anchor) {
            var element = document.getElementById(anchor);
            if (element) {
                var topPos = element.offsetTop;
                // for Safari browers
                document.body.scrollTop = topPos;
                // for IE, Chrome, FireFox, Opera browers
                document.documentElement.scrollTop = topPos;
            }
        }
    }

    function avoidOnLoadConflict (onLoad) {
        if (!window.onload) {
            window.onload = onLoad;
        }
        else {
            var oldFunc = window.onload;
            window.onload = function () {
                oldFunc();
                onLoad();            
            };
        }
    }
    avoidOnLoadConflict(makeSureAnchorJumped);
    </script>

    </body>
</html>

